package org.cheniy.domain.strategy.service.armory;

import java.util.Date;

/**
 * @author cheniy
 * @description 调度配置的策略
 * @create 2025/3/1 23:21
 */
public interface IStrategyDispatch {


    /**
     * 调度配置的策略（抽奖）
     * @param strategyId
     * @return
     */
    Integer getRandomAwardId(Long strategyId);


    /**
     * 调度配置的策略（抽奖）+权重
     * @param strategyId
     * @return
     */
    Integer getRandomAwardId(Long strategyId,String weightKey);

    /**
     * 根据策略ID和奖品ID，扣减奖品缓存库存，并加锁rock
     * @param strategyId
     * @param awardId
     * @return
     */
    Boolean subtractionAwardStock(Long strategyId, Integer awardId, Date endDateTime);
}
